package classes;

public class Game {
	private Player player2;
	private Player player1;
	private Boolean gameOver;
	private Boolean gameStarted;
	private int turnCounter;
	private String starts;
	private int playersReady;
	private Boolean gameAllowed;
	
	public int getTurnCounter() {
		return turnCounter;
	}

	public void addTurnCounter() {
		this.turnCounter += 1;
	}
	
	public void addMinusOneTurnCounter() {
		this.turnCounter -= 1;
	}

	public Boolean getGameStarted() {
		return gameStarted;
	}

	public void setGameStarted(Boolean gameStarted) {
		this.gameStarted = gameStarted;
	}
	
	public Game(Player host){
		this.player1 = host;
		this.player2 = null;
		this.gameOver = false;
		this.gameStarted = false;
		this.turnCounter = 1 + (int)(Math.random()*10);
		this.playersReady = 0;
		this.gameAllowed = false;
	}
	
	public Boolean getGameAllowed() {
		return gameAllowed;
	}

	public void setGameAllowed(Boolean gameAllowed) {
		this.gameAllowed = gameAllowed;
	}

	public int getPlayersReady() {
		return playersReady;
	}

	public void addPlayersReady() {
		this.playersReady += 1;
	}

	public Player getPlayer2() {
		return player2;
	}

	public void setPlayer2(Player player2) {
		this.player2 = player2;
	}
	
	public void setPlayer2() {
		this.player2 = null;
	}

	public Player getPlayer1() {
		return player1;
	}

	public void setPlayer1(Player player1) {
		this.player1 = player1;
	}

	public void setPlayer1() {
		this.player1 = null;
	}
	
	public Boolean getGameOver() {
		return gameOver;
	}

	public void setGameOver(Boolean gameOver) {
		this.gameOver = gameOver;
	}

	public String getStarts() {
		return starts;
	}

	public void setStarts(String starts) {
		this.starts = starts;
	}


	

}
